import {clsx, type ClassValue} from "clsx"
import {twMerge} from "tailwind-merge"
import {format, isToday, isYesterday} from "date-fns";

export function cn(...inputs: ClassValue[]) {
    return twMerge(clsx(inputs))
}

/// social
export const formatDateLabel = (dateStr: string) => {
    const date = new Date(dateStr);
    if (isToday(date)) return 'Today'
    if (isYesterday(date)) return 'Yesterday'

    // '星期几 几月 几日'
    return format(date, 'EEEE, MMMM d')
}
/// social
